SRC=$(shell ls *.c)
OBJ=$(SRC:.c=.o)
BIN=process.exe
CC=gcc
OFLAG=-o
CFLAG=-c
RM=rm -f

$(BIN):$(OBJ)
	@$(CC) $(OFLAG) $@ $^
	@echo "linking $^ to $@"
%.o:%.c
	@$(CC) $(CFLAG) $<
	@echo "linking $< to $@"

.PHONY:clean
clean:
	$(RM) $(BIN) $(OBJ)

	
